<%@ page language="java" import="java.util.*,entity.*,dao.*,dao.impl.*" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");

String userName = request.getParameter("uname");
String userPass = request.getParameter("upass");
UserDao userDao = new UserDaoImpl();
User user = userDao.findUser(userName);

if(user!=null&&user.getUserPass().equals(userPass)){
	session.setAttribute("user", user);
	response.sendRedirect("../index.jsp");
}else{
	response.sendRedirect("../login.jsp");
}
%>